<!DOCTYPE html>
<html class="client-nojs vector-feature-night-mode-disabled vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-sticky-header-enabled" lang="en" dir="ltr"><head>
<meta charset="UTF-8">
<title>Unit testing</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="https://en.wikipedia.org/wiki/Unit_testing"> <link href="./mw/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/ext.pygments.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/user.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./mw/site.styles.css">
<link rel="stylesheet" type="text/css" href="./mw/noscript.css">
<link rel="stylesheet" type="text/css" href="./footer.css">
<link rel="stylesheet" type="text/css" href="./vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Unit_testing rootpage-Unit_testing skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading">
<span id="openzim-page-title" class="mw-page-title-main"><span class="mw-page-title-main">Unit testing</span></span>
</h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="en" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr">
<p class="mw-empty-elt">
</p>
<style data-mw-deduplicate="TemplateStyles:r1129693374">
/* start https://en.wikipedia.org/ */
.mw-parser-output .hlist dl,.mw-parser-output .hlist ol,.mw-parser-output .hlist ul{margin:0;padding:0}.mw-parser-output .hlist dd,.mw-parser-output .hlist dt,.mw-parser-output .hlist li{margin:0;display:inline}.mw-parser-output .hlist.inline,.mw-parser-output .hlist.inline dl,.mw-parser-output .hlist.inline ol,.mw-parser-output .hlist.inline ul,.mw-parser-output .hlist dl dl,.mw-parser-output .hlist dl ol,.mw-parser-output .hlist dl ul,.mw-parser-output .hlist ol dl,.mw-parser-output .hlist ol ol,.mw-parser-output .hlist ol ul,.mw-parser-output .hlist ul dl,.mw-parser-output .hlist ul ol,.mw-parser-output .hlist ul ul{display:inline}.mw-parser-output .hlist .mw-empty-li{display:none}.mw-parser-output .hlist dt::after{content:": "}.mw-parser-output .hlist dd::after,.mw-parser-output .hlist li::after{content:" · ";font-weight:bold}.mw-parser-output .hlist dd:last-child::after,.mw-parser-output .hlist dt:last-child::after,.mw-parser-output .hlist li:last-child::after{content:none}.mw-parser-output .hlist dd dd:first-child::before,.mw-parser-output .hlist dd dt:first-child::before,.mw-parser-output .hlist dd li:first-child::before,.mw-parser-output .hlist dt dd:first-child::before,.mw-parser-output .hlist dt dt:first-child::before,.mw-parser-output .hlist dt li:first-child::before,.mw-parser-output .hlist li dd:first-child::before,.mw-parser-output .hlist li dt:first-child::before,.mw-parser-output .hlist li li:first-child::before{content:" (";font-weight:normal}.mw-parser-output .hlist dd dd:last-child::after,.mw-parser-output .hlist dd dt:last-child::after,.mw-parser-output .hlist dd li:last-child::after,.mw-parser-output .hlist dt dd:last-child::after,.mw-parser-output .hlist dt dt:last-child::after,.mw-parser-output .hlist dt li:last-child::after,.mw-parser-output .hlist li dd:last-child::after,.mw-parser-output .hlist li dt:last-child::after,.mw-parser-output .hlist li li:last-child::after{content:")";font-weight:normal}.mw-parser-output .hlist ol{counter-reset:listitem}.mw-parser-output .hlist ol>li{counter-increment:listitem}.mw-parser-output .hlist ol>li::before{content:" "counter(listitem)"\a0 "}.mw-parser-output .hlist dd ol>li:first-child::before,.mw-parser-output .hlist dt ol>li:first-child::before,.mw-parser-output .hlist li ol>li:first-child::before{content:" ("counter(listitem)"\a0 "}
/* end https://en.wikipedia.org/ */
</style><style data-mw-deduplicate="TemplateStyles:r1246091330">
/* start https://en.wikipedia.org/ */
.mw-parser-output .sidebar{width:22em;float:right;clear:right;margin:0.5em 0 1em 1em;background:var(--background-color-neutral-subtle,#f8f9fa);border:1px solid var(--border-color-base,#a2a9b1);padding:0.2em;text-align:center;line-height:1.4em;font-size:88%;border-collapse:collapse;display:table}body.skin-minerva .mw-parser-output .sidebar{display:table!important;float:right!important;margin:0.5em 0 1em 1em!important}.mw-parser-output .sidebar-subgroup{width:100%;margin:0;border-spacing:0}.mw-parser-output .sidebar-left{float:left;clear:left;margin:0.5em 1em 1em 0}.mw-parser-output .sidebar-none{float:none;clear:both;margin:0.5em 1em 1em 0}.mw-parser-output .sidebar-outer-title{padding:0 0.4em 0.2em;font-size:125%;line-height:1.2em;font-weight:bold}.mw-parser-output .sidebar-top-image{padding:0.4em}.mw-parser-output .sidebar-top-caption,.mw-parser-output .sidebar-pretitle-with-top-image,.mw-parser-output .sidebar-caption{padding:0.2em 0.4em 0;line-height:1.2em}.mw-parser-output .sidebar-pretitle{padding:0.4em 0.4em 0;line-height:1.2em}.mw-parser-output .sidebar-title,.mw-parser-output .sidebar-title-with-pretitle{padding:0.2em 0.8em;font-size:145%;line-height:1.2em}.mw-parser-output .sidebar-title-with-pretitle{padding:0.1em 0.4em}.mw-parser-output .sidebar-image{padding:0.2em 0.4em 0.4em}.mw-parser-output .sidebar-heading{padding:0.1em 0.4em}.mw-parser-output .sidebar-content{padding:0 0.5em 0.4em}.mw-parser-output .sidebar-content-with-subgroup{padding:0.1em 0.4em 0.2em}.mw-parser-output .sidebar-above,.mw-parser-output .sidebar-below{padding:0.3em 0.8em;font-weight:bold}.mw-parser-output .sidebar-collapse .sidebar-above,.mw-parser-output .sidebar-collapse .sidebar-below{border-top:1px solid #aaa;border-bottom:1px solid #aaa}.mw-parser-output .sidebar-navbar{text-align:right;font-size:115%;padding:0 0.4em 0.4em}.mw-parser-output .sidebar-list-title{padding:0 0.4em;text-align:left;font-weight:bold;line-height:1.6em;font-size:105%}.mw-parser-output .sidebar-list-title-c{padding:0 0.4em;text-align:center;margin:0 3.3em}@media(max-width:640px){body.mediawiki .mw-parser-output .sidebar{width:100%!important;clear:both;float:none!important;margin-left:0!important;margin-right:0!important}}body.skin--responsive .mw-parser-output .sidebar a>img{max-width:none!important}@media screen{html.skin-theme-clientpref-night .mw-parser-output .sidebar:not(.notheme) .sidebar-list-title,html.skin-theme-clientpref-night .mw-parser-output .sidebar:not(.notheme) .sidebar-title-with-pretitle{background:transparent!important}html.skin-theme-clientpref-night .mw-parser-output .sidebar:not(.notheme) .sidebar-title-with-pretitle a{color:var(--color-progressive)!important}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .sidebar:not(.notheme) .sidebar-list-title,html.skin-theme-clientpref-os .mw-parser-output .sidebar:not(.notheme) .sidebar-title-with-pretitle{background:transparent!important}html.skin-theme-clientpref-os .mw-parser-output .sidebar:not(.notheme) .sidebar-title-with-pretitle a{color:var(--color-progressive)!important}}@media print{body.ns-0 .mw-parser-output .sidebar{display:none!important}}
/* end https://en.wikipedia.org/ */
</style><table class="sidebar sidebar-collapse nomobile"><tbody><tr><td class="sidebar-pretitle">Part of a series on</td></tr><tr><th class="sidebar-title-with-pretitle"><a href="Software_development" title="Software development">Software development</a></th></tr><tr><td class="sidebar-content">
<div class="sidebar-list mw-collapsible"><div class="sidebar-list-title" style="color: var(--color-base)">Core activities</div><div class="sidebar-list-content mw-collapsible-content hlist">
<ul><li><a href="Data_modeling" title="Data modeling">Data modeling</a></li>
<li><a href="Software_development_process" title="Software development process">Processes</a></li>
<li><a href="Requirements_analysis" title="Requirements analysis">Requirements</a></li>
<li><a href="Software_design" title="Software design">Design</a></li>
<li><a href="Software_construction" title="Software construction">Construction</a></li>
<li><a href="Software_engineering" title="Software engineering">Engineering</a></li>
<li><a href="Software_testing" title="Software testing">Testing</a></li>
<li><a href="Debugging" title="Debugging">Debugging</a></li>
<li><a href="Software_deployment" title="Software deployment">Deployment</a></li>
<li><a href="Software_maintenance" title="Software maintenance">Maintenance</a></li></ul></div></div></td>
</tr><tr><td class="sidebar-content">
<div class="sidebar-list mw-collapsible mw-collapsed"><div class="sidebar-list-title" style="color: var(--color-base)">Paradigms and models</div><div class="sidebar-list-content mw-collapsible-content hlist">
<ul><li><a href="Agile_software_development" title="Agile software development">Agile</a></li>
<li><a href="Cleanroom_software_engineering" title="Cleanroom software engineering">Cleanroom</a></li>
<li><a href="Incremental_build_model" title="Incremental build model">Incremental</a></li>
<li><a href="Software_prototyping" title="Software prototyping">Prototyping</a></li>
<li><a href="Spiral_model" title="Spiral model">Spiral</a></li>
<li><a href="V-model_(software_development)" title="V-model (software development)">V model</a></li>
<li><a href="Waterfall_model" title="Waterfall model">Waterfall</a></li></ul></div></div></td>
</tr><tr><td class="sidebar-content">
<div class="sidebar-list mw-collapsible mw-collapsed"><div class="sidebar-list-title" style="color: var(--color-base)"><a href="Software_development_methodology" class="mw-redirect" title="Software development methodology">Methodologies</a> and frameworks</div><div class="sidebar-list-content mw-collapsible-content hlist">
<ul><li><a href="Adaptive_software_development" title="Adaptive software development">ASD</a></li>
<li><a href="Disciplined_agile_delivery" title="Disciplined agile delivery">DAD</a></li>
<li><a href="DevOps" title="DevOps">DevOps</a></li>
<li><a href="Dynamic_systems_development_method" title="Dynamic systems development method">DSDM</a></li>
<li><a href="Feature-driven_development" title="Feature-driven development">FDD</a></li>
<li><a href="Iterative_and_incremental_development" title="Iterative and incremental development">IID</a></li>
<li><a href="Kanban_(development)" title="Kanban (development)">Kanban</a></li>
<li><a href="Lean_software_development" title="Lean software development">Lean SD</a></li>
<li><a href="Scrum_(software_development)#Large-scale_Scrum" title="Scrum (software development)">LeSS</a></li>
<li><a href="Model-driven_development" class="mw-redirect" title="Model-driven development">MDD</a></li>
<li><a href="Microsoft_Solutions_Framework" title="Microsoft Solutions Framework">MSF</a></li>
<li><a href="Personal_software_process" title="Personal software process">PSP</a></li>
<li><a href="Rapid_application_development" title="Rapid application development">RAD</a></li>
<li><a href="Rational_unified_process" title="Rational unified process">RUP</a></li>
<li><a href="Scaled_agile_framework" title="Scaled agile framework">SAFe</a></li>
<li><a href="Scrum_(software_development)" title="Scrum (software development)">Scrum</a></li>
<li><a href="SEMAT" title="SEMAT">SEMAT</a></li>
<li><a href="Test-driven_development" title="Test-driven development">TDD</a></li>
<li><a href="Team_software_process" title="Team software process">TSP</a></li>
<li><a href="Unified_process" title="Unified process">UP</a></li>
<li><a href="Extreme_programming" title="Extreme programming">XP</a></li></ul></div></div></td>
</tr><tr><td class="sidebar-content">
<div class="sidebar-list mw-collapsible mw-collapsed"><div class="sidebar-list-title" style="color: var(--color-base)">Supporting disciplines</div><div class="sidebar-list-content mw-collapsible-content hlist">
<ul><li><a href="Software_configuration_management" title="Software configuration management">Configuration management</a></li>
<li><a href="Deployment_management#Computer_science" title="Deployment management">Deployment management</a></li>
<li><a href="Software_documentation" title="Software documentation">Documentation</a></li>
<li><a href="Software_project_management" title="Software project management">Project management</a></li>
<li><a href="Software_quality_assurance" title="Software quality assurance">Quality assurance</a></li>
<li><a href="User_experience" title="User experience">User experience</a></li></ul></div></div></td>
</tr><tr><td class="sidebar-content">
<div class="sidebar-list mw-collapsible mw-collapsed"><div class="sidebar-list-title" style="color: var(--color-base)">Practices</div><div class="sidebar-list-content mw-collapsible-content hlist">
<ul><li><a href="Acceptance_test-driven_development" title="Acceptance test-driven development">ATDD</a></li>
<li><a href="Behavior-driven_development" title="Behavior-driven development">BDD</a></li>
<li><a href="Extreme_programming_practices#Collective_code_ownership" title="Extreme programming practices">CCO</a></li>
<li><a href="Continuous_delivery" title="Continuous delivery">CD</a></li>
<li><a href="Continuous_integration" title="Continuous integration">CI</a></li>
<li><a href="Domain-driven_design" title="Domain-driven design">DDD</a></li>
<li><a href="Pair_programming" title="Pair programming">PP</a></li>
<li><a href="Specification_by_example" title="Specification by example">SBE</a></li>
<li><a href="Stand-up_meeting" title="Stand-up meeting">Stand-up</a></li>
<li><a href="Test-driven_development" title="Test-driven development">TDD</a></li></ul></div></div></td>
</tr><tr><td class="sidebar-content">
<div class="sidebar-list mw-collapsible mw-collapsed"><div class="sidebar-list-title" style="color: var(--color-base)"><a href="Programming_tool" title="Programming tool">Tools</a></div><div class="sidebar-list-content mw-collapsible-content hlist">
<ul><li><a href="Build_automation" title="Build automation">Build automation</a></li>
<li><a href="Compiler" title="Compiler">Compiler</a></li>
<li><a href="Debugger" title="Debugger">Debugger</a></li>
<li><a href="Graphical_user_interface_builder" title="Graphical user interface builder">GUI builder</a></li>
<li><a href="Integrated_development_environment" title="Integrated development environment">IDE</a></li>
<li><a href="Infrastructure_as_code" title="Infrastructure as code">Infrastructure as code</a></li>
<li><a href="Profiling_(computer_programming)" title="Profiling (computer programming)">Profiler</a></li>
<li><a href="Application-release_automation" title="Application-release automation">Release automation</a></li>
<li><a href="UML_tool" title="UML tool">UML Modeling</a></li></ul></div></div></td>
</tr><tr><td class="sidebar-content">
<div class="sidebar-list mw-collapsible mw-collapsed"><div class="sidebar-list-title" style="color: var(--color-base)">Standards and bodies of knowledge</div><div class="sidebar-list-content mw-collapsible-content hlist">
<ul><li><a href="Capability_Maturity_Model_Integration" title="Capability Maturity Model Integration">CMMI</a></li>
<li><a href="IEEE_Standards_Association" title="IEEE Standards Association">IEEE standards</a></li>
<li><a href="International_Requirements_Engineering_Board" title="International Requirements Engineering Board">IREB</a></li>
<li><a href="ISO_9001" class="mw-redirect" title="ISO 9001">ISO 9001</a></li>
<li><a href="ISO/IEC_JTC_1/SC_7" title="ISO/IEC JTC 1/SC 7">ISO/IEC standards</a></li>
<li><a href="ITIL" title="ITIL">ITIL</a></li>
<li><a href="Object_Management_Group" title="Object Management Group">OMG</a></li>
<li><a href="Project_Management_Body_of_Knowledge" title="Project Management Body of Knowledge">PMBOK</a></li>
<li><a href="Software_Engineering_Body_of_Knowledge" title="Software Engineering Body of Knowledge">SWEBOK</a></li></ul></div></div></td>
</tr><tr><td class="sidebar-content">
<div class="sidebar-list mw-collapsible mw-collapsed"><div class="sidebar-list-title" style="color: var(--color-base)">Glossaries</div><div class="sidebar-list-content mw-collapsible-content hlist">
<ul><li><a href="Glossary_of_artificial_intelligence" title="Glossary of artificial intelligence">Artificial intelligence</a></li>
<li><a href="Glossary_of_computer_science" title="Glossary of computer science">Computer science</a></li>
<li><a href="Glossary_of_electrical_and_electronics_engineering" title="Glossary of electrical and electronics engineering">Electrical and electronics engineering</a></li></ul></div></div></td>
</tr><tr><td class="sidebar-content">
<div class="sidebar-list mw-collapsible mw-collapsed"><div class="sidebar-list-title" style="color: var(--color-base)">Outlines</div><div class="sidebar-list-content mw-collapsible-content hlist">
<ul><li><a href="Outline_of_software_development" title="Outline of software development">Outline of software development</a></li></ul></div></div></td>
</tr><tr><td class="sidebar-navbar"><style data-mw-deduplicate="TemplateStyles:r1239400231">
/* start https://en.wikipedia.org/ */
.mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}html.skin-theme-clientpref-night .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}@media(prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}}@media print{.mw-parser-output .navbar{display:none!important}}
/* end https://en.wikipedia.org/ */
</style></td></tr></tbody></table>
<p><b>Unit testing</b>, <abbr title="also known as">a.k.a.</abbr> <b>component</b> or <b>module</b> testing, is a form of <a href="Software_testing" title="Software testing">software testing</a> by which isolated <a href="Source_code" title="Source code">source code</a> is tested to validate expected behavior.<sup id="cite_ref-kolawa_1-0" class="reference"><a href="#cite_note-kolawa-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup>
</p><p>Unit testing describes tests that are run at the unit-level to contrast testing at the <a href="Integration_testing" title="Integration testing">integration</a> or <a href="System_testing" title="System testing">system</a> level.<sup id="cite_ref-2" class="reference"><a href="#cite_note-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup>
</p>
<meta property="mw:PageProp/toc">
<div class="mw-heading mw-heading2"><h2 id="History">History</h2></div>
<p>Unit testing, as a principle for testing separately smaller parts of large software systems, dates back to the early days of software engineering. In June 1956 at US Navy's Symposium on Advanced Programming Methods for Digital Computers, H.D. Benington presented the <a href="Semi-Automatic_Ground_Environment" title="Semi-Automatic Ground Environment">SAGE</a> project. It featured a specification-based approach where the coding phase was followed by "parameter testing" to validate component subprograms against their specification, followed then by an "assembly testing" for parts put together.<sup id="cite_ref-3" class="reference"><a href="#cite_note-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-:0_4-0" class="reference"><a href="#cite_note-:0-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup>
</p><p>In 1964, a similar approach is described for the software of the <a href="Project_Mercury" title="Project Mercury">Mercury project</a>, where individual units developed by different programmes underwent "unit tests" before being integrated together.<sup id="cite_ref-5" class="reference"><a href="#cite_note-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup> In 1969, testing methodologies appear more structured, with unit tests, component tests and integration tests collectively validating individual parts written separately and their progressive assembly into larger blocks.<sup id="cite_ref-6" class="reference"><a href="#cite_note-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup> Some public standards adopted in the late 1960s, such as MIL-STD-483<sup id="cite_ref-7" class="reference"><a href="#cite_note-7"><span class="cite-bracket">[</span>7<span class="cite-bracket">]</span></a></sup> and MIL-STD-490, contributed further to a wide acceptance of unit testing in large projects.
</p><p>Unit testing was in those times interactive<sup id="cite_ref-:0_4-1" class="reference"><a href="#cite_note-:0-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup> or automated,<sup id="cite_ref-8" class="reference"><a href="#cite_note-8"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup> using either coded tests or capture and replay testing tools. In 1989, <a href="Kent_Beck" title="Kent Beck">Kent Beck</a> described a testing framework for <a href="Smalltalk" title="Smalltalk">Smalltalk</a> (later called <a href="SUnit" title="SUnit">SUnit</a>) in "<a rel="nofollow" class="external text" href="https://web.archive.org/web/20150315073817/http://www.xprogramming.com/testfram.htm">Simple Smalltalk Testing: With Patterns</a>". In 1997, <a href="Kent_Beck" title="Kent Beck">Kent Beck</a> and <a href="Erich_Gamma" title="Erich Gamma">Erich Gamma</a> developed and released <a href="JUnit" title="JUnit">JUnit</a>, a unit test framework that became popular with <a href="Java_(programming_language)" title="Java (programming language)">Java</a> developers.<sup id="cite_ref-9" class="reference"><a href="#cite_note-9"><span class="cite-bracket">[</span>9<span class="cite-bracket">]</span></a></sup> <a href="Google" title="Google">Google</a> embraced automated testing around 2005–2006.<sup id="cite_ref-10" class="reference"><a href="#cite_note-10"><span class="cite-bracket">[</span>10<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading2"><h2 id="Unit">Unit</h2></div>
<p>A unit is defined as a single behaviour exhibited by the system under test (SUT), usually corresponding to a requirement. While a unit may correspond to a single function or module (in <a href="Procedural_programming" title="Procedural programming">procedural programming</a>) or a single method or class (in <a href="Object-oriented_programming" title="Object-oriented programming">object-oriented programming</a>), functions/methods and modules/classes do not necessarily correspond to units. From the system requirements perspective only the perimeter of the system is relevant, thus only entry points to externally visible system behaviours define units.<sup id="cite_ref-11" class="reference"><a href="#cite_note-11"><span class="cite-bracket">[</span>11<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading2"><h2 id="Execution">Execution</h2></div>
<p>Unit tests can be performed manually or via <a href="Automated_test" class="mw-redirect" title="Automated test">automated test</a> execution. Automated tests include benefits such as: running tests often, running tests without staffing cost, and consistent and repeatable testing.
</p><p>Testing is often performed by the programmer who writes and modifies the code under test.
Unit testing may be viewed as part of the process of writing code.
</p>
<div class="mw-heading mw-heading2"><h2 id="Testing_criteria">Testing criteria</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1251242444">
/* start https://en.wikipedia.org/ */
.mw-parser-output .ambox{border:1px solid #a2a9b1;border-left:10px solid #36c;background-color:#fbfbfb;box-sizing:border-box}.mw-parser-output .ambox+link+.ambox,.mw-parser-output .ambox+link+style+.ambox,.mw-parser-output .ambox+link+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+style+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+link+.ambox{margin-top:-1px}html body.mediawiki .mw-parser-output .ambox.mbox-small-left{margin:4px 1em 4px 0;overflow:hidden;width:238px;border-collapse:collapse;font-size:88%;line-height:1.25em}.mw-parser-output .ambox-speedy{border-left:10px solid #b32424;background-color:#fee7e6}.mw-parser-output .ambox-delete{border-left:10px solid #b32424}.mw-parser-output .ambox-content{border-left:10px solid #f28500}.mw-parser-output .ambox-style{border-left:10px solid #fc3}.mw-parser-output .ambox-move{border-left:10px solid #9932cc}.mw-parser-output .ambox-protection{border-left:10px solid #a2a9b1}.mw-parser-output .ambox .mbox-text{border:none;padding:0.25em 0.5em;width:100%}.mw-parser-output .ambox .mbox-image{border:none;padding:2px 0 2px 0.5em;text-align:center}.mw-parser-output .ambox .mbox-imageright{border:none;padding:2px 0.5em 2px 0;text-align:center}.mw-parser-output .ambox .mbox-empty-cell{border:none;padding:0;width:1px}.mw-parser-output .ambox .mbox-image-div{width:52px}@media(min-width:720px){.mw-parser-output .ambox{margin:0 10%}}@media print{body.ns-0 .mw-parser-output .ambox{display:none!important}}
/* end https://en.wikipedia.org/ */
</style>
<p>During development, a programmer may code criteria, or results that are known to be good, into the test to verify the unit's correctness.
</p><p>During test execution, frameworks <a href="Computer_data_logging" class="mw-redirect" title="Computer data logging">log</a> tests that fail any criterion and report them in a summary.
</p><p>For this, the most commonly used approach is test - function - expected value.
</p>
<div class="mw-heading mw-heading2"><h2 id="Test_case">Test case</h2></div>
<div class="excerpt-block"><style data-mw-deduplicate="TemplateStyles:r1066933788">
/* start https://en.wikipedia.org/ */
.mw-parser-output .excerpt-hat .mw-editsection-like{font-style:normal}
/* end https://en.wikipedia.org/ */
</style><style data-mw-deduplicate="TemplateStyles:r1236090951">
/* start https://en.wikipedia.org/ */
.mw-parser-output .hatnote{font-style:italic}.mw-parser-output div.hatnote{padding-left:1.6em;margin-bottom:0.5em}.mw-parser-output .hatnote i{font-style:normal}.mw-parser-output .hatnote+link+.hatnote{margin-top:-0.5em}@media print{body.ns-0 .mw-parser-output .hatnote{display:none!important}}
/* end https://en.wikipedia.org/ */
</style><div role="note" class="hatnote navigation-not-searchable dablink excerpt-hat selfref">This paragraph is an excerpt from <a href="Test_case" title="Test case">Test case</a>.<span class="mw-editsection-like "><span class="mw-editsection-bracket">[</span><a class="external text external" href="https://en.wikipedia.org/w/index.php?title=Test_case&action=edit">edit</a><span class="mw-editsection-bracket">]</span></span></div><div class="excerpt">
In <a href="Software_engineering" title="Software engineering">software engineering</a>, a <a href="Test_case" title="Test case">test case</a> is a specification of the inputs, execution conditions, testing procedure, and expected results that define a single test to be executed to achieve a particular <a href="Software_testing" title="Software testing">software testing</a> objective, such as to exercise a particular program path or to verify compliance with a specific requirement.<sup id="cite_ref-12" class="reference"><a href="#cite_note-12"><span class="cite-bracket">[</span>12<span class="cite-bracket">]</span></a></sup> Test cases underlie testing that is methodical rather than haphazard. A <a href="Test_suite" title="Test suite">battery of test cases</a> can be built to produce the desired coverage of the software being tested. Formally defined test cases allow the same tests to be run repeatedly against successive versions of the software, allowing for effective and consistent <a href="Regression_testing" title="Regression testing">regression testing</a>.<sup id="cite_ref-13" class="reference"><a href="#cite_note-13"><span class="cite-bracket">[</span>13<span class="cite-bracket">]</span></a></sup></div></div>
<div class="mw-heading mw-heading2"><h2 id="Test_double">Test double</h2></div>
<div class="excerpt-block"><div role="note" class="hatnote navigation-not-searchable dablink excerpt-hat selfref">This paragraph is an excerpt from <a href="Test_double" title="Test double">Test double</a>.<span class="mw-editsection-like "><span class="mw-editsection-bracket">[</span><a class="external text external" href="https://en.wikipedia.org/w/index.php?title=Test_double&action=edit">edit</a><span class="mw-editsection-bracket">]</span></span></div><div class="excerpt">
A <a href="Test_double" title="Test double">test double</a> is <a href="Software" title="Software">software</a> used in <a href="Software_testing" title="Software testing">software</a> <a href="Test_automation" title="Test automation">test automation</a> that satisfies a <a href="Dependency_(computer_science)" class="mw-redirect" title="Dependency (computer science)">dependency</a> so that the test need not depend on production code. A test double provides functionality via an <a href="Interface_(computing)" title="Interface (computing)">interface</a> that the software under test cannot distinguish from production code.</div></div>
<div class="mw-heading mw-heading2"><h2 id="Parameterized_test">Parameterized test</h2></div>
<p>A <a href="Parameterized_test" class="mw-redirect" title="Parameterized test">parameterized test</a> is a test that accepts a set of values that can be used to enable the test to run with multiple, different input values. A testing framework that supports parametrized tests supports a way to encode parameter sets and to run the test with each set.
</p><p>Use of parametrized tests can reduce test code duplication.
</p><p>Parameterized tests are supported by <a href="TestNG" title="TestNG">TestNG</a>, <a href="JUnit" title="JUnit">JUnit</a>,<sup id="cite_ref-FOOTNOTEGulatiSharma2017133–137Chapter_§7_JUnit_5_Extension_Model_-_Parameterized_Test_14-0" class="reference"><a href="#cite_note-FOOTNOTEGulatiSharma2017133–137Chapter_§7_JUnit_5_Extension_Model_-_Parameterized_Test-14"><span class="cite-bracket">[</span>14<span class="cite-bracket">]</span></a></sup> <a href="XUnit" title="XUnit">XUnit</a> and <a href="NUnit" title="NUnit">NUnit</a>, as well as in various JavaScript test frameworks.
</p><p>Parameters for the unit tests may be coded manually or in some cases are automatically generated by the test framework. In recent years support was added for writing more powerful (unit) tests, leveraging the concept of theories, test cases that execute the same steps, but using test data generated at runtime, unlike regular parameterized tests that use the same execution steps with input sets that are pre-defined.
</p>
<div class="mw-heading mw-heading2"><h2 id="Code_visibility">Code visibility</h2></div>
<p>Test code needs access to the code it is testing, but testing should not compromise normal design goals such as <a href="Information_hiding" title="Information hiding">information hiding</a>, encapsulation and the <a href="Separation_of_concerns" title="Separation of concerns">separation of concerns</a>. To enable access to code not exposed in the external API, unit tests can be located in the same project or <a href="Module_(programming)" class="mw-redirect" title="Module (programming)">module</a> as the code being tested.
</p><p>In <a href="Object_oriented_design" class="mw-redirect" title="Object oriented design">object oriented design</a> this still may not provide access to private data and methods. Therefore, extra work may be necessary for unit tests. In <a href="Java_(programming_language)" title="Java (programming language)">Java</a> and other languages, a developer can use <a href="Reflection_(computer_science)" class="mw-redirect" title="Reflection (computer science)">reflection</a> to access private fields and methods.<sup id="cite_ref-15" class="reference"><a href="#cite_note-15"><span class="cite-bracket">[</span>15<span class="cite-bracket">]</span></a></sup> Alternatively, an <a href="Inner_class" title="Inner class">inner class</a> can be used to hold the unit tests so they have visibility of the enclosing class's members and attributes. In the <a href=".NET_Framework" title=".NET Framework">.NET Framework</a> and some other programming languages, <a href="Partial_class" class="mw-redirect" title="Partial class">partial classes</a> may be used to expose private methods and data for the tests to access.
</p><p>It is important that code solely for accommodating tests does not remain in the production code. In <a href="C_(programming_language)" title="C (programming language)">C</a> and other languages, <a href="Directive_(programming)" title="Directive (programming)">compiler directives</a> such as <code>#if DEBUG ... #endif</code> can be placed around such additional classes and indeed all other test-related code to prevent them being compiled into the released code. This means the released code is not exactly the same as what was unit tested. The regular running of fewer but more comprehensive, end-to-end, integration tests on the final release build can ensure (among other things) that no production code exists that subtly relies on aspects of the test harness.
</p><p>There is some debate among developers, as to whether it is wise to test private methods and data anyway. Some argue that private members are a mere implementation detail that may change, and should be allowed to do so without breaking numbers of tests. Thus it should be sufficient to test any class through its public interface or through its subclass interface, which some languages call the "protected" interface.<sup id="cite_ref-16" class="reference"><a href="#cite_note-16"><span class="cite-bracket">[</span>16<span class="cite-bracket">]</span></a></sup> Others say that crucial aspects of functionality may be implemented in private methods and testing them directly offers advantage of smaller and more direct unit tests.<sup id="cite_ref-17" class="reference"><a href="#cite_note-17"><span class="cite-bracket">[</span>17<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-18" class="reference"><a href="#cite_note-18"><span class="cite-bracket">[</span>18<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading2"><h2 id="Agile">Agile</h2></div>
<div role="note" class="hatnote navigation-not-searchable">Main article: <a href="Agile_software_development" title="Agile software development">Agile software development</a></div>
<p>Sometimes, in the agile software development, unit testing is done per <a href="User_story" title="User story">user story</a> and comes in the later half of the sprint after requirements gathering and development are complete. Typically, the developers or other members from the development team, such as <a href="Information_technology_consulting" title="Information technology consulting">consultants</a>, will write step-by-step 'test scripts' for the developers to execute in the tool. Test scripts are generally written to prove the effective and technical operation of specific developed features in the tool, as opposed to full fledged business processes that would be interfaced by the <a href="End_user" title="End user">end user</a>, which is typically done during <a href="User_acceptance_test" class="mw-redirect" title="User acceptance test">user acceptance testing</a>. If the test-script can be fully executed from start to finish without incident, the unit test is considered to have "passed", otherwise errors are noted and the user story is moved back to development in an 'in-progress' state. User stories that successfully pass unit tests are moved on to the final steps of the sprint - Code review, peer review, and then lastly a 'show-back' session demonstrating the developed tool to stakeholders.
</p>
<div class="mw-heading mw-heading2"><h2 id="Test-driven_development">Test-driven development</h2></div>
<div role="note" class="hatnote navigation-not-searchable">Main article: <a href="Test-driven_development" title="Test-driven development">Test-driven development</a></div>
<p>In test-driven development (TDD), unit tests are written before the related production code is written. Starting with a failing test, then adds <i>just enough</i> production code to make the test pass, then refactors the code as makes sense and then repeats by adding another failing test.
</p>
<div class="mw-heading mw-heading2"><h2 id="Value">Value</h2></div>
<p>Unit testing is intended to ensure that the units meet their <a href="Software_design" title="Software design">design</a> and behave as intended.<sup id="cite_ref-hamill_19-0" class="reference"><a href="#cite_note-hamill-19"><span class="cite-bracket">[</span>19<span class="cite-bracket">]</span></a></sup>
</p><p>By writing tests first for the smallest testable units, then the compound behaviors between those, one can build up comprehensive tests for complex applications.<sup id="cite_ref-hamill_19-1" class="reference"><a href="#cite_note-hamill-19"><span class="cite-bracket">[</span>19<span class="cite-bracket">]</span></a></sup>
</p><p>One goal of unit testing is to isolate each part of the program and show that the individual parts are correct.<sup id="cite_ref-kolawa_1-1" class="reference"><a href="#cite_note-kolawa-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup> A unit test provides a strict, written <a href="Design_by_Contract" class="mw-redirect" title="Design by Contract">contract</a> that the piece of code must satisfy.
</p>
<div class="mw-heading mw-heading3"><h3 id="Early_detection_of_problems_in_the_development_cycle">Early detection of problems in the development cycle</h3></div>
<p>Unit testing finds problems early in the <a href="Development_cycle" class="mw-redirect" title="Development cycle">development cycle</a>. This includes both bugs in the programmer's implementation and flaws or missing parts of the specification for the unit. The process of writing a thorough set of tests forces the author to think through inputs, outputs, and error conditions, and thus more crisply define the unit's desired behavior.
</p>
<div class="mw-heading mw-heading3"><h3 id="Reduced_cost">Reduced cost</h3></div>
<p>The cost of finding a bug before coding begins or when the code is first written is considerably lower than the cost of detecting, identifying, and correcting the bug later. Bugs in released code may also cause costly problems for the end-users of the software.<sup id="cite_ref-20" class="reference"><a href="#cite_note-20"><span class="cite-bracket">[</span>20<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-21" class="reference"><a href="#cite_note-21"><span class="cite-bracket">[</span>21<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-22" class="reference"><a href="#cite_note-22"><span class="cite-bracket">[</span>22<span class="cite-bracket">]</span></a></sup> Code can be impossible or difficult to unit test if poorly written, thus unit testing can force developers to structure functions and objects in better ways.
</p>
<div class="mw-heading mw-heading3"><h3 id="More_frequent_releases">More frequent releases</h3></div>
<p>Unit testing enables more frequent releases in software development. By testing individual components in isolation, developers can quickly identify and address issues, leading to faster iteration and release cycles.<sup id="cite_ref-23" class="reference"><a href="#cite_note-23"><span class="cite-bracket">[</span>23<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading3"><h3 id="Allows_for_code_refactoring">Allows for code refactoring</h3></div>
<p>Unit testing allows the programmer to <a href="Refactoring" class="mw-redirect" title="Refactoring">refactor</a> code or upgrade system libraries at a later date, and make sure the module still works correctly (e.g., in <a href="Regression_testing" title="Regression testing">regression testing</a>). The procedure is to write test cases for all <a href="Subroutine" class="mw-redirect" title="Subroutine">functions</a> and <a href="Method_(computer_science)" class="mw-redirect" title="Method (computer science)">methods</a> so that whenever a change causes a fault, it can be identified quickly.
</p>
<div class="mw-heading mw-heading3"><h3 id="Detects_changes_which_may_break_a_design_contract">Detects changes which may break a design contract</h3></div>
<p>Unit tests detect changes which may break a <a href="Design_by_contract" title="Design by contract">design contract</a>.
</p>
<div class="mw-heading mw-heading3"><h3 id="Reduce_uncertainty">Reduce uncertainty</h3></div>
<p>Unit testing may reduce uncertainty in the units themselves and can be used in a <a href="Top-down_and_bottom-up_design" class="mw-redirect" title="Top-down and bottom-up design">bottom-up</a> testing style approach. By testing the parts of a program first and then testing the sum of its parts, <a href="Integration_testing" title="Integration testing">integration testing</a> becomes much easier.
</p>
<div class="mw-heading mw-heading3"><h3 id="Documentation_of_system_behavior">Documentation of system behavior</h3></div>
<p>Some programmers contend that unit tests provide a form of documentation of the code. Developers wanting to learn what functionality is provided by a unit, and how to use it, can review the unit tests to gain an understanding of it.
</p><p>Test cases can embody characteristics that are critical to the success of the unit. These characteristics can indicate appropriate/inappropriate use of a unit as well as negative behaviors that are to be trapped by the unit. A test case documents these critical characteristics, although many software development environments do not rely solely upon code to document the product in development.
</p><p>In some processes, the act of writing tests and the code under test, plus associated refactoring, may take the place of formal design. Each unit test can be seen as a design element specifying classes, methods, and observable behavior.
</p>
<div class="mw-heading mw-heading2"><h2 id="Limitations_and_disadvantages">Limitations and disadvantages</h2></div>
<p>Testing will not catch every error in the program, because it cannot evaluate every execution path in any but the most trivial programs. This <a href="Decision_problem" title="Decision problem">problem</a> is a superset of the <a href="Halting_problem" title="Halting problem">halting problem</a>, which is <a href="Undecidable_problem" title="Undecidable problem">undecidable</a>. The same is true for unit testing. Additionally, unit testing by definition only tests the functionality of the units themselves. Therefore, it will not catch integration errors or broader system-level errors (such as functions performed across multiple units, or non-functional test areas such as <a href="Software_performance_testing" title="Software performance testing">performance</a>). Unit testing should be done in conjunction with other <a href="Software_testing" title="Software testing">software testing</a> activities, as they can only show the presence or absence of particular errors; they cannot prove a complete absence of errors. To guarantee correct behavior for every execution path and every possible input, and ensure the absence of errors, other techniques are required, namely the application of <a href="Formal_verification" title="Formal verification">formal methods</a> to prove that a software component has no unexpected behavior.
</p><p>An elaborate hierarchy of unit tests does not equal integration testing. Integration with peripheral units should be included in integration tests, but not in unit tests. Integration testing typically still relies heavily on humans <a href="Manual_testing" title="Manual testing">testing manually</a>; high-level or global-scope testing can be difficult to automate, such that manual testing often appears faster and cheaper.
</p><p>Software testing is a combinatorial problem. For example, every Boolean decision statement requires at least two tests: one with an outcome of "true" and one with an outcome of "false". As a result, for every line of code written, programmers often need 3 to 5 lines of test code. This obviously takes time and its investment may not be worth the effort. There are problems that cannot easily be tested at all – for example those that are <a href="Nondeterministic_algorithm" title="Nondeterministic algorithm">nondeterministic</a> or involve multiple <a href="Thread_(computer_science)" class="mw-redirect" title="Thread (computer science)">threads</a>. In addition, code for a unit test is as likely to be buggy as the code it is testing. <a href="Fred_Brooks" title="Fred Brooks">Fred Brooks</a> in <i><a href="The_Mythical_Man-Month" title="The Mythical Man-Month">The Mythical Man-Month</a></i> quotes: "Never go to sea with two chronometers; take one or three."<sup id="cite_ref-24" class="reference"><a href="#cite_note-24"><span class="cite-bracket">[</span>24<span class="cite-bracket">]</span></a></sup> Meaning, if two <a href="Marine_chronometer" title="Marine chronometer">chronometers</a> contradict, how do you know which one is correct?
</p>
<div class="mw-heading mw-heading3"><h3 id="Difficulty_in_setting_up_realistic_and_useful_tests">Difficulty in setting up realistic and useful tests</h3></div>
<p>Another challenge related to writing the unit tests is the difficulty of setting up realistic and useful tests. It is necessary to create relevant initial conditions so the part of the application being tested behaves like part of the complete system. If these initial conditions are not set correctly, the test will not be exercising the code in a realistic context, which diminishes the value and accuracy of unit test results.
</p>
<div class="mw-heading mw-heading3"><h3 id="Requires_discipline_throughout_the_development_process">Requires discipline throughout the development process</h3></div>
<p>To obtain the intended benefits from unit testing, rigorous discipline is needed throughout the software development process.
</p>
<div class="mw-heading mw-heading3"><h3 id="Requires_version_control">Requires version control</h3></div>
<p>It is essential to keep careful records not only of the tests that have been performed, but also of all changes that have been made to the source code of this or any other unit in the software. Use of a <a href="Version_control" title="Version control">version control</a> system is essential. If a later version of the unit fails a particular test that it had previously passed, the version-control software can provide a list of the source code changes (if any) that have been applied to the unit since that time.
</p>
<div class="mw-heading mw-heading3"><h3 id="Requires_regular_reviews">Requires regular reviews</h3></div>
<p>It is also essential to implement a sustainable process for ensuring that test case failures are reviewed regularly and addressed immediately.<sup id="cite_ref-25" class="reference"><a href="#cite_note-25"><span class="cite-bracket">[</span>25<span class="cite-bracket">]</span></a></sup> If such a process is not implemented and ingrained into the team's workflow, the application will evolve out of sync with the unit test suite, increasing false positives and reducing the effectiveness of the test suite.
</p>
<div class="mw-heading mw-heading3"><h3 id="Limitations_for_embedded_system_software">Limitations for embedded system software</h3></div>
<p>Unit testing embedded system software presents a unique challenge: Because the software is being developed on a different platform than the one it will eventually run on, you cannot readily run a test program in the actual deployment environment, as is possible with desktop programs.<sup id="cite_ref-26" class="reference"><a href="#cite_note-26"><span class="cite-bracket">[</span>26<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading3"><h3 id="Limitations_for_testing_integration_with_external_systems">Limitations for testing integration with external systems</h3></div>
<p>Unit tests tend to be easiest when a method has input parameters and some output. It is not as easy to create unit tests when a major function of the method is to interact with something external to the application. For example, a method that will work with a database might require a mock up of database interactions to be created, which probably won't be as comprehensive as the real database interactions.<sup id="cite_ref-27" class="reference"><a href="#cite_note-27"><span class="cite-bracket">[</span>27<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading2"><h2 id="Examples">Examples</h2></div>
<div class="mw-heading mw-heading3"><h3 id="JUnit">JUnit</h3></div>
<p>Below is an example of a JUnit test suite. It focuses on the <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr">Adder</code> class.
</p>
<div class="mw-highlight mw-highlight-lang-java mw-content-ltr" dir="ltr"><pre><span class="kd">class</span> <span class="nc">Adder</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="kd">public</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="nf">add</span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">a</span><span class="p">,</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">b</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">a</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">b</span><span class="p">;</span>
<span class="w"> </span><span class="p">}</span>
<span class="p">}</span>
</pre></div>
<p>The test suite uses <a href="Assertion_(computing)" class="mw-redirect" title="Assertion (computing)">assert</a> statements to verify the expected result of various input values to the <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr">sum</code> method.
</p>
<div class="mw-highlight mw-highlight-lang-java mw-content-ltr" dir="ltr"><pre><span class="kn">import static</span><span class="w"> </span><span class="nn">org.junit.Assert.assertEquals</span><span class="p">;</span>
<span class="kn">import</span><span class="w"> </span><span class="nn">org.junit.Test</span><span class="p">;</span>
<span class="kd">public</span><span class="w"> </span><span class="kd">class</span> <span class="nc">AdderUnitTest</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="nd">@Test</span>
<span class="w"> </span><span class="kd">public</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">sumReturnsZeroForZeroInput</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="n">Adder</span><span class="w"> </span><span class="n">adder</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Adder</span><span class="p">();</span>
<span class="w"> </span><span class="n">assertEquals</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">adder</span><span class="p">.</span><span class="na">add</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">));</span>
<span class="w"> </span><span class="p">}</span>
<span class="w"> </span><span class="nd">@Test</span>
<span class="w"> </span><span class="kd">public</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">sumReturnsSumOfTwoPositiveNumbers</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="n">Adder</span><span class="w"> </span><span class="n">adder</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Adder</span><span class="p">();</span>
<span class="w"> </span><span class="n">assertEquals</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span><span class="w"> </span><span class="n">adder</span><span class="p">.</span><span class="na">add</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">2</span><span class="p">));</span>
<span class="w"> </span><span class="p">}</span>
<span class="w"> </span><span class="nd">@Test</span>
<span class="w"> </span><span class="kd">public</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">sumReturnsSumOfTwoNegativeNumbers</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="n">Adder</span><span class="w"> </span><span class="n">adder</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Adder</span><span class="p">();</span>
<span class="w"> </span><span class="n">assertEquals</span><span class="p">(</span><span class="o">-</span><span class="mi">3</span><span class="p">,</span><span class="w"> </span><span class="n">adder</span><span class="p">.</span><span class="na">add</span><span class="p">(</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="o">-</span><span class="mi">2</span><span class="p">));</span>
<span class="w"> </span><span class="p">}</span>
<span class="w"> </span><span class="nd">@Test</span>
<span class="w"> </span><span class="kd">public</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">sumReturnsSumOfLargeNumbers</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="n">Adder</span><span class="w"> </span><span class="n">adder</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Adder</span><span class="p">();</span>
<span class="w"> </span><span class="n">assertEquals</span><span class="p">(</span><span class="mi">2222</span><span class="p">,</span><span class="w"> </span><span class="n">adder</span><span class="p">.</span><span class="na">add</span><span class="p">(</span><span class="mi">1234</span><span class="p">,</span><span class="w"> </span><span class="mi">988</span><span class="p">));</span>
<span class="w"> </span><span class="p">}</span>
<span class="p">}</span>
</pre></div>
<div class="mw-heading mw-heading2"><h2 id="As_executable_specifications">As executable specifications</h2></div>
<p>Using unit-tests as a design specification has one significant advantage over other design methods: The design document (the unit-tests themselves) can itself be used to verify the implementation. The tests will never pass unless the developer implements a solution according to the design.
</p><p>Unit testing lacks some of the accessibility of a diagrammatic specification such as a <a href="Unified_Modeling_Language" title="Unified Modeling Language">UML</a> diagram, but they may be generated from the unit test using automated tools. Most modern languages have free tools (usually available as extensions to <a href="Integrated_development_environment" title="Integrated development environment">IDEs</a>). Free tools, like those based on the <a href="XUnit" title="XUnit">xUnit</a> framework, outsource to another system the graphical rendering of a view for human consumption.<sup id="cite_ref-28" class="reference"><a href="#cite_note-28"><span class="cite-bracket">[</span>28<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading2"><h2 id="Applications">Applications</h2></div>
<div class="mw-heading mw-heading3"><h3 id="Extreme_programming">Extreme programming</h3></div>
<p>Unit testing is the cornerstone of <a href="Extreme_programming" title="Extreme programming">extreme programming</a>, which relies on an automated <a href="List_of_unit_testing_frameworks" title="List of unit testing frameworks">unit testing framework</a>. This automated unit testing framework can be either third party, e.g., <a href="XUnit" title="XUnit">xUnit</a>, or created within the development group.
</p><p>Extreme programming uses the creation of unit tests for <a href="Test-driven_development" title="Test-driven development">test-driven development</a>. The developer writes a unit test that exposes either a software requirement or a defect. This test will fail because either the requirement isn't implemented yet, or because it intentionally exposes a defect in the existing code. Then, the developer writes the simplest code to make the test, along with other tests, pass.
</p><p>Most code in a system is unit tested, but not necessarily all paths through the code. Extreme programming mandates a "test everything that can possibly break" strategy, over the traditional "test every execution path" method. This leads developers to develop fewer tests than classical methods, but this isn't really a problem, more a restatement of fact, as classical methods have rarely ever been followed methodically enough for all execution paths to have been thoroughly tested. Extreme programming simply recognizes that testing is rarely exhaustive (because it is often too expensive and time-consuming to be economically viable) and provides guidance on how to effectively focus limited resources.
</p><p>Crucially, the test code is considered a first class project artifact in that it is maintained at the same quality as the implementation code, with all duplication removed. Developers release unit testing code to the code repository in conjunction with the code it tests. Extreme programming's thorough unit testing allows the benefits mentioned above, such as simpler and more confident code development and <a href="Refactoring" class="mw-redirect" title="Refactoring">refactoring</a>, simplified code integration, accurate documentation, and more modular designs. These unit tests are also constantly run as a form of <a href="Regression_test" class="mw-redirect" title="Regression test">regression test</a>.
</p><p>Unit testing is also critical to the concept of <a href="Emergent_Design" class="mw-redirect" title="Emergent Design">Emergent Design</a>. As emergent design is heavily dependent upon refactoring, unit tests are an integral component.
</p>
<div class="mw-heading mw-heading3"><h3 id="Automated_testing_frameworks">Automated testing frameworks</h3></div>
<p>An automated testing framework provides features for automating test execution and can accelerate writing and running tests. Frameworks have been developed for <a href="List_of_unit_testing_frameworks" title="List of unit testing frameworks">a wide variety of programming languages</a>.
</p><p>Generally, frameworks are <a href="Third-party_software_component" title="Third-party software component">third-party</a>; not distributed with a compiler or <a href="Integrated_development_environment" title="Integrated development environment">integrated development environment</a> (IDE).
</p><p>Tests can be written without using a framework to exercise the code under test using <a href="Assertion_(software_development)" title="Assertion (software development)">assertions</a>, <a href="Exception_handling" title="Exception handling">exception handling</a>, and other <a href="Control_flow" title="Control flow">control flow</a> mechanisms to verify behavior and report failure. Some note that testing without a framework is valuable since there is a <a href="Barrier_to_entry" class="mw-redirect" title="Barrier to entry">barrier to entry</a> for the adoption of a framework; that having some tests is better than none, but once a framework is in place, adding tests can be easier.<sup id="cite_ref-29" class="reference"><a href="#cite_note-29"><span class="cite-bracket">[</span>29<span class="cite-bracket">]</span></a></sup>
</p><p>In some frameworks advanced test features are missing and must be hand-coded.
</p>
<div class="mw-heading mw-heading3"><h3 id="Language-level_unit_testing_support">Language-level unit testing support</h3></div>
<p>Some programming languages directly support unit testing. Their grammar allows the direct declaration of unit tests without importing a library (whether third party or standard). Additionally, the Boolean conditions of the unit tests can be expressed in the same syntax as Boolean expressions used in non-unit test code, such as what is used for <code class="mw-highlight mw-highlight-lang-java mw-content-ltr" style="" dir="ltr"><span class="k">if</span></code> and <code class="mw-highlight mw-highlight-lang-java mw-content-ltr" style="" dir="ltr"><span class="k">while</span></code> statements.
</p><p>Languages with built-in unit testing support include:
</p>
<style data-mw-deduplicate="TemplateStyles:r1184024115">
/* start https://en.wikipedia.org/ */
.mw-parser-output .div-col{margin-top:0.3em;column-width:30em}.mw-parser-output .div-col-small{font-size:90%}.mw-parser-output .div-col-rules{column-rule:1px solid #aaa}.mw-parser-output .div-col dl,.mw-parser-output .div-col ol,.mw-parser-output .div-col ul{margin-top:0}.mw-parser-output .div-col li,.mw-parser-output .div-col dd{page-break-inside:avoid;break-inside:avoid-column}
/* end https://en.wikipedia.org/ */
</style><div class="div-col" style="column-width: 20em;">
<ul><li><a href="Cobra_(programming_language)" title="Cobra (programming language)">Cobra</a></li>
<li><a href="D_(programming_language)" title="D (programming language)">D</a><sup id="cite_ref-30" class="reference"><a href="#cite_note-30"><span class="cite-bracket">[</span>30<span class="cite-bracket">]</span></a></sup></li>
<li><a href="Rust_(programming_language)" title="Rust (programming language)">Rust</a><sup id="cite_ref-31" class="reference"><a href="#cite_note-31"><span class="cite-bracket">[</span>31<span class="cite-bracket">]</span></a></sup></li></ul>
</div>
<p>Languages with standard unit testing framework support include:
</p>
<div class="div-col" style="column-width: 20em;">
<ul><li><a href="Apex_(programming_language)" class="mw-redirect" title="Apex (programming language)">Apex</a></li>
<li><a href="Crystal_(programming_language)" title="Crystal (programming language)">Crystal</a><sup id="cite_ref-32" class="reference"><a href="#cite_note-32"><span class="cite-bracket">[</span>32<span class="cite-bracket">]</span></a></sup></li>
<li><a href="Erlang_(programming_language)" title="Erlang (programming language)">Erlang</a></li>
<li><a href="Go_(programming_language)" title="Go (programming language)">Go</a><sup id="cite_ref-33" class="reference"><a href="#cite_note-33"><span class="cite-bracket">[</span>33<span class="cite-bracket">]</span></a></sup></li>
<li><a href="Julia_(programming_language)" title="Julia (programming language)">Julia</a><sup id="cite_ref-34" class="reference"><a href="#cite_note-34"><span class="cite-bracket">[</span>34<span class="cite-bracket">]</span></a></sup></li>
<li><a href="LabVIEW" title="LabVIEW">LabVIEW</a></li>
<li><a href="MATLAB" title="MATLAB">MATLAB</a></li>
<li><a href="Python_(programming_language)" title="Python (programming language)">Python</a><sup id="cite_ref-35" class="reference"><a href="#cite_note-35"><span class="cite-bracket">[</span>35<span class="cite-bracket">]</span></a></sup></li>
<li><a href="Racket_(programming_language)" title="Racket (programming language)">Racket</a><sup id="cite_ref-Racket_Unit_Testing_36-0" class="reference"><a href="#cite_note-Racket_Unit_Testing-36"><span class="cite-bracket">[</span>36<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Racket_Unit_Testing_Main_dist_37-0" class="reference"><a href="#cite_note-Racket_Unit_Testing_Main_dist-37"><span class="cite-bracket">[</span>37<span class="cite-bracket">]</span></a></sup></li>
<li><a href="Ruby_(programming_language)" title="Ruby (programming language)">Ruby</a><sup id="cite_ref-38" class="reference"><a href="#cite_note-38"><span class="cite-bracket">[</span>38<span class="cite-bracket">]</span></a></sup></li>
<li><a href="Swift_(programming_language)" title="Swift (programming language)">Swift</a></li></ul>
</div>
<p>Some languages do not have built-in unit-testing support but have established unit testing libraries or frameworks. These languages include:
</p>
<div class="div-col" style="column-width: 20em;">
<ul><li><a href="ABAP" title="ABAP">ABAP</a></li>
<li><a href="C%2B%2B" title="C++">C++</a></li>
<li><a href="C_Sharp_(programming_language)" title="C Sharp (programming language)">C#</a></li>
<li><a href="Clojure" title="Clojure">Clojure</a><sup id="cite_ref-Clojure_Unit_Testing_Framework_39-0" class="reference"><a href="#cite_note-Clojure_Unit_Testing_Framework-39"><span class="cite-bracket">[</span>39<span class="cite-bracket">]</span></a></sup></li>
<li><a href="Elixir_(programming_language)" title="Elixir (programming language)">Elixir</a></li>
<li><a href="Java_(programming_language)" title="Java (programming language)">Java</a></li>
<li><a href="JavaScript" title="JavaScript">JavaScript</a></li>
<li><a href="Objective-C" title="Objective-C">Objective-C</a></li>
<li><a href="Perl" title="Perl">Perl</a></li>
<li><a href="PHP" title="PHP">PHP</a></li>
<li><a href="Windows_PowerShell" class="mw-redirect" title="Windows PowerShell">PowerShell</a><sup id="cite_ref-40" class="reference"><a href="#cite_note-40"><span class="cite-bracket">[</span>40<span class="cite-bracket">]</span></a></sup></li>
<li><a href="R_(programming_language)" title="R (programming language)">R</a> with testthat</li>
<li><a href="Scala_(programming_language)" title="Scala (programming language)">Scala</a></li>
<li><a href="Tcl" title="Tcl">Tcl</a></li>
<li><a href="Visual_Basic_.NET" class="mw-redirect" title="Visual Basic .NET">Visual Basic .NET</a></li>
<li><a href="Xojo" title="Xojo">Xojo</a> with XojoUnit</li></ul>
</div>
<div class="mw-heading mw-heading2"><h2 id="See_also">See also</h2></div>
<div class="div-col" style="column-width: 20em;">
<ul><li><a href="Acceptance_testing" title="Acceptance testing">Acceptance testing</a></li>
<li><a href="Characterization_test" title="Characterization test">Characterization test</a></li>
<li><a href="Component-based_usability_testing" title="Component-based usability testing">Component-based usability testing</a></li>
<li><a href="Design_predicates" title="Design predicates">Design predicates</a></li>
<li><a href="Design_by_contract" title="Design by contract">Design by contract</a></li>
<li><a href="Extreme_programming" title="Extreme programming">Extreme programming</a></li>
<li><a href="Functional_testing" title="Functional testing">Functional testing</a></li>
<li><a href="Integration_testing" title="Integration testing">Integration testing</a></li>
<li><a href="List_of_unit_testing_frameworks" title="List of unit testing frameworks">List of unit testing frameworks</a></li>
<li><a href="Regression_testing" title="Regression testing">Regression testing</a></li>
<li><a href="Software_archaeology" title="Software archaeology">Software archaeology</a></li>
<li><a href="Software_testing" title="Software testing">Software testing</a></li>
<li><a href="System_testing" title="System testing">System testing</a></li>
<li><a href="Test_case" title="Test case">Test case</a></li>
<li><a href="Test-driven_development" title="Test-driven development">Test-driven development</a></li>
<li><a href="XUnit" title="XUnit">xUnit</a> – a family of unit testing frameworks.</li></ul>
</div>
<div class="mw-heading mw-heading2"><h2 id="References">References</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1239543626">
/* start https://en.wikipedia.org/ */
.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}
/* end https://en.wikipedia.org/ */
</style><div class="reflist">
<div class="mw-references-wrap mw-references-columns"><ol class="references">
<li id="cite_note-kolawa-1"><span class="mw-cite-backlink">^ <a href="#cite_ref-kolawa_1-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-kolawa_1-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">
/* start https://en.wikipedia.org/ */
.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("./mw/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("./mw/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("./mw/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("./mw/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}
/* end https://en.wikipedia.org/ */
</style><cite id="CITEREFKolawaHuizinga,_Dorota2007" class="citation book cs1">Kolawa, Adam; Huizinga, Dorota (2007). <i>Automated Defect Prevention: Best Practices in Software Management</i>. Wiley-IEEE Computer Society Press. p. 75. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>978-0-470-04212-0</bdi>.</cite></span>
</li>
<li id="cite_note-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-2">^</a></b></span> <span class="reference-text">Amazon Web Services (AWS). (n.d.). <i>What is Unit Testing?</i>. Retrieved May 2, 2025, from <a rel="nofollow" class="external autonumber" href="https://aws.amazon.com/what-is/unit-testing/">[1]</a>(<a rel="nofollow" class="external free" href="https://aws.amazon.com/what-is/unit-testing/">https://aws.amazon.com/what-is/unit-testing/</a>)</span>
</li>
<li id="cite_note-3"><span class="mw-cite-backlink"><b><a href="#cite_ref-3">^</a></b></span> <span class="reference-text"><cite id="CITEREFBenington1956" class="citation journal cs1">Benington, Herbert D. (1956). "Production of large computer programs". <i>Proceedings of the Symposium on Advanced Programming Methods for Digital Computers, Washington, D.C., June 28–29, 1956</i>. Office of Naval Research, Department of the Navy: <span class="nowrap">15–</span>28.</cite></span>
</li>
<li id="cite_note-:0-4"><span class="mw-cite-backlink">^ <a href="#cite_ref-:0_4-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-:0_4-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFBenington1987" class="citation journal cs1">Benington, H. D. (1 March 1987). <a rel="nofollow" class="external text" href="https://dl.acm.org/doi/10.5555/41765.41799">"Production of large computer programs (reprint of the 1956 paper with an updated foreword)"</a>. <i>Proceedings of the 9th International Conference on Software Engineering</i>. ICSE '87. Washington, DC, USA: IEEE Computer Society Press: <span class="nowrap">299–</span>310. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>978-0-89791-216-7</bdi>.</cite></span>
</li>
<li id="cite_note-5"><span class="mw-cite-backlink"><b><a href="#cite_ref-5">^</a></b></span> <span class="reference-text"><cite id="CITEREFDoneganPackardPashby1964" class="citation book cs1">Donegan, James J.; Packard, Calvin; Pashby, Paul (1 January 1964). <a rel="nofollow" class="external text" href="https://dl.acm.org/doi/10.1145/800257.808889">"Experiences with the goddard computing system during manned spaceflight missions"</a>. <i>Proceedings of the 1964 19th ACM national conference</i>. ACM '64. New York, NY, USA: Association for Computing Machinery. pp. <span class="nowrap">12.101 –</span> <span class="nowrap">12.108</span>. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1145%2F800257.808889">10.1145/800257.808889</a>. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>978-1-4503-7918-2</bdi>.</cite> <span class="cs1-hidden-error citation-comment"><code class="cs1-code">{{cite book}}</code>: </span><span class="cs1-hidden-error citation-comment">ISBN / Date incompatibility (help)</span></span>
</li>
<li id="cite_note-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-6">^</a></b></span> <span class="reference-text"><cite id="CITEREFZimmerman1969" class="citation book cs1">Zimmerman, Norman A. (26 August 1969). <a rel="nofollow" class="external text" href="https://dl.acm.org/doi/10.1145/800195.805951">"System integration as a programming function"</a>. <i>Proceedings of the 1969 24th national conference</i>. ACM '69. New York, NY, USA: Association for Computing Machinery. pp. <span class="nowrap">459–</span>467. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1145%2F800195.805951">10.1145/800195.805951</a>. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>978-1-4503-7493-4</bdi>.</cite></span>
</li>
<li id="cite_note-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-7">^</a></b></span> <span class="reference-text"><cite class="citation book cs1"><i>MIL-STD-483 Military standard: configuration management practices for systems, equipment, munitions, and computer programs</i>. United states, Department of Defense. 31 December 1970. pp. Section 3.4.7.2. <q>The contractor shall then code and test software Units, and enter the source and object code, and associated listings of each successfully tested Unit into the Developmental Configuration</q></cite></span>
</li>
<li id="cite_note-8"><span class="mw-cite-backlink"><b><a href="#cite_ref-8">^</a></b></span> <span class="reference-text"><cite id="CITEREFTighe1978" class="citation journal cs1">Tighe, Michael F. (1 January 1978). <span class="id-lock-subscription" title="Paid subscription required"><a rel="nofollow" class="external text" href="https://dl.acm.org/doi/10.1145/1007775.811118">"The value of a proper software quality assurance methodology"</a></span>. <i>ACM SIGMETRICS Performance Evaluation Review</i>. <b>7</b> (<span class="nowrap">3–</span>4): <span class="nowrap">165–</span>172. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1145%2F1007775.811118">10.1145/1007775.811118</a>. <a href="ISSN_(identifier)" class="mw-redirect" title="ISSN (identifier)">ISSN</a> <a rel="nofollow" class="external text" href="https://search.worldcat.org/issn/0163-5999">0163-5999</a>.</cite></span>
</li>
<li id="cite_note-9"><span class="mw-cite-backlink"><b><a href="#cite_ref-9">^</a></b></span> <span class="reference-text"><cite id="CITEREFGulati2017" class="citation book cs1">Gulati, Shekhar (2017). <i>Java Unit Testing with JUnit 5 : Test Driven Development with JUnit 5</i>. Rahul Sharma. Berkeley, CA: Apress. p. 8. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>978-1-4842-3015-2</bdi>. <a href="OCLC_(identifier)" class="mw-redirect" title="OCLC (identifier)">OCLC</a> <a rel="nofollow" class="external text" href="https://search.worldcat.org/oclc/1012347252">1012347252</a>.</cite></span>
</li>
<li id="cite_note-10"><span class="mw-cite-backlink"><b><a href="#cite_ref-10">^</a></b></span> <span class="reference-text"><cite id="CITEREFWinters2020" class="citation book cs1">Winters, Titus (2020). <i>Software engineering at Google : lessons learned from programming over time</i>. Tom Manshreck, Hyrum Wright (1st ed.). Sebastopol, CA: O'Reilly. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>978-1-4920-8274-3</bdi>. <a href="OCLC_(identifier)" class="mw-redirect" title="OCLC (identifier)">OCLC</a> <a rel="nofollow" class="external text" href="https://search.worldcat.org/oclc/1144086840">1144086840</a>.</cite></span>
</li>
<li id="cite_note-11"><span class="mw-cite-backlink"><b><a href="#cite_ref-11">^</a></b></span> <span class="reference-text"><cite id="CITEREFBeck2002" class="citation book cs1"><a href="Kent_Beck" title="Kent Beck">Beck, Kent</a> (2002). <i>Test-Driven Development by Example</i>. Addison-Wesley. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>978-0321146533</bdi>.</cite></span>
</li>
<li id="cite_note-12"><span class="mw-cite-backlink"><b><a href="#cite_ref-12">^</a></b></span> <span class="reference-text"><cite class="citation book cs1"><i>Systems and software engineering -- Vocabulary</i>. Iso/Iec/IEEE 24765:2010(E). 1 December 2010. pp. <span class="nowrap">1–</span>418. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1109%2FIEEESTD.2010.5733835">10.1109/IEEESTD.2010.5733835</a>. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>978-0-7381-6205-8</bdi>.</cite></span>
</li>
<li id="cite_note-13"><span class="mw-cite-backlink"><b><a href="#cite_ref-13">^</a></b></span> <span class="reference-text"><cite id="CITEREFKaner2003" class="citation journal cs1">Kaner, Cem (May 2003). <a rel="nofollow" class="external text" href="http://www.kaner.com/pdfs/GoodTest.pdf">"What Is a Good Test Case?"</a> <span class="cs1-format">(PDF)</span>. <i>STAR East</i>: 2.</cite></span>
</li>
<li id="cite_note-FOOTNOTEGulatiSharma2017133–137Chapter_§7_JUnit_5_Extension_Model_-_Parameterized_Test-14"><span class="mw-cite-backlink"><b><a href="#cite_ref-FOOTNOTEGulatiSharma2017133–137Chapter_§7_JUnit_5_Extension_Model_-_Parameterized_Test_14-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFGulatiSharma2017">Gulati & Sharma 2017</a>, pp. 133–137, Chapter §7 JUnit 5 Extension Model - Parameterized Test.</span>
</li>
<li id="cite_note-15"><span class="mw-cite-backlink"><b><a href="#cite_ref-15">^</a></b></span> <span class="reference-text"><cite id="CITEREFBurton2003" class="citation web cs1">Burton, Ross (12 November 2003). <a rel="nofollow" class="external text" href="http://www.onjava.com/pub/a/onjava/2003/11/12/reflection.html">"Subverting Java Access Protection for Unit Testing"</a>. O'Reilly Media, Inc<span class="reference-accessdate">. Retrieved <span class="nowrap">12 August</span> 2009</span>.</cite></span>
</li>
<li id="cite_note-16"><span class="mw-cite-backlink"><b><a href="#cite_ref-16">^</a></b></span> <span class="reference-text"><cite id="CITEREFvan_RossumWarsaw2001" class="citation web cs1">van Rossum, Guido; Warsaw, Barry (5 July 2001). <a rel="nofollow" class="external text" href="https://www.python.org/dev/peps/pep-0008/">"PEP 8 -- Style Guide for Python Code"</a>. Python Software Foundation<span class="reference-accessdate">. Retrieved <span class="nowrap">6 May</span> 2012</span>.</cite></span>
</li>
<li id="cite_note-17"><span class="mw-cite-backlink"><b><a href="#cite_ref-17">^</a></b></span> <span class="reference-text"><cite id="CITEREFNewkirk2004" class="citation web cs1">Newkirk, James (7 June 2004). <a rel="nofollow" class="external text" href="http://blogs.msdn.com/jamesnewkirk/archive/2004/06/07/150361.aspx">"Testing Private Methods/Member Variables - Should you or shouldn't you"</a>. Microsoft Corporation<span class="reference-accessdate">. Retrieved <span class="nowrap">12 August</span> 2009</span>.</cite></span>
</li>
<li id="cite_note-18"><span class="mw-cite-backlink"><b><a href="#cite_ref-18">^</a></b></span> <span class="reference-text"><cite id="CITEREFStall2005" class="citation web cs1">Stall, Tim (1 March 2005). <a rel="nofollow" class="external text" href="http://www.codeproject.com/KB/cs/testnonpublicmembers.aspx">"How to Test Private and Protected methods in .NET"</a>. CodeProject<span class="reference-accessdate">. Retrieved <span class="nowrap">12 August</span> 2009</span>.</cite></span>
</li>
<li id="cite_note-hamill-19"><span class="mw-cite-backlink">^ <a href="#cite_ref-hamill_19-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-hamill_19-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFHamill2004" class="citation book cs1">Hamill, Paul (2004). <a rel="nofollow" class="external text" href="https://books.google.com/books?id=2ksvdhhnWQsC"><i>Unit Test Frameworks: Tools for High-Quality Software Development</i></a>. O'Reilly Media, Inc. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>9780596552817</bdi>.</cite></span>
</li>
<li id="cite_note-20"><span class="mw-cite-backlink"><b><a href="#cite_ref-20">^</a></b></span> <span class="reference-text"><cite id="CITEREFBoehmPapaccio1988" class="citation journal cs1"><a href="Barry_Boehm" title="Barry Boehm">Boehm, Barry W.</a>; Papaccio, Philip N. (October 1988). <a rel="nofollow" class="external text" href="https://web.archive.org/web/20161009084506/http://faculty.ksu.edu.sa/ghazy/Cost_MSc/R6.pdf">"Understanding and Controlling Software Costs"</a> <span class="cs1-format">(PDF)</span>. <i>IEEE Transactions on Software Engineering</i>. <b>14</b> (10): <span class="nowrap">1462–</span>1477. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1109%2F32.6191">10.1109/32.6191</a>. Archived from <a rel="nofollow" class="external text" href="http://faculty.ksu.edu.sa/ghazy/Cost_MSc/R6.pdf">the original</a> <span class="cs1-format">(PDF)</span> on 9 October 2016<span class="reference-accessdate">. Retrieved <span class="nowrap">13 May</span> 2016</span>.</cite></span>
</li>
<li id="cite_note-21"><span class="mw-cite-backlink"><b><a href="#cite_ref-21">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://msdn.microsoft.com/en-us/library/ee330950%28v=vs.110%29.aspx">"Test Early and Often"</a>. Microsoft.</cite></span>
</li>
<li id="cite_note-22"><span class="mw-cite-backlink"><b><a href="#cite_ref-22">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://www.ni.com/white-paper/8082/en/">"Prove It Works: Using the Unit Test Framework for Software Testing and Validation"</a>. <a href="National_Instruments" title="National Instruments">National Instruments</a>. 21 August 2017.</cite></span>
</li>
<li id="cite_note-23"><span class="mw-cite-backlink"><b><a href="#cite_ref-23">^</a></b></span> <span class="reference-text"><cite id="CITEREFErik2023" class="citation web cs1">Erik (10 March 2023). <a rel="nofollow" class="external text" href="https://stackify.com/unit-testing-basics-best-practices/">"You Still Don't Know How to Do Unit Testing (and Your Secret is Safe with Me)"</a>. <i>Stackify</i><span class="reference-accessdate">. Retrieved <span class="nowrap">10 March</span> 2023</span>.</cite></span>
</li>
<li id="cite_note-24"><span class="mw-cite-backlink"><b><a href="#cite_ref-24">^</a></b></span> <span class="reference-text"><cite id="CITEREFBrooks1995" class="citation book cs1"><a href="Fred_Brooks" title="Fred Brooks">Brooks, Frederick J.</a> (1995) [1975]. <a href="The_Mythical_Man-Month" title="The Mythical Man-Month"><i>The Mythical Man-Month</i></a>. Addison-Wesley. p. <a rel="nofollow" class="external text" href="https://archive.org/details/mythicalmonth00broo/page/64">64</a>. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>978-0-201-83595-3</bdi>.</cite></span>
</li>
<li id="cite_note-25"><span class="mw-cite-backlink"><b><a href="#cite_ref-25">^</a></b></span> <span class="reference-text"><cite id="CITEREFdaVeiga2008" class="citation web cs1">daVeiga, Nada (6 February 2008). <a rel="nofollow" class="external text" href="http://www.ddj.com/development-tools/206105233">"Change Code Without Fear: Utilize a regression safety net"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">8 February</span> 2008</span>.</cite></span>
</li>
<li id="cite_note-26"><span class="mw-cite-backlink"><b><a href="#cite_ref-26">^</a></b></span> <span class="reference-text"><cite id="CITEREFKucharski2011" class="citation web cs1">Kucharski, Marek (23 November 2011). <a rel="nofollow" class="external text" href="https://www.electronicdesign.com/technologies/embedded-revolution/article/21794376/making-unit-testing-practical-for-embedded-development">"Making Unit Testing Practical for Embedded Development"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">20 July</span> 2020</span>.</cite></span>
</li>
<li id="cite_note-27"><span class="mw-cite-backlink"><b><a href="#cite_ref-27">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://wiki.c2.com/?UnitTestsAndDatabases">"Unit Tests And Databases"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">29 January</span> 2024</span>.</cite></span>
</li>
<li id="cite_note-28"><span class="mw-cite-backlink"><b><a href="#cite_ref-28">^</a></b></span> <span class="reference-text">GeeksforGeeks. (2024). <i>Unit Testing</i>. Retrieved May 2, 2025, from <a rel="nofollow" class="external autonumber" href="https://www.geeksforgeeks.org/unit-testing-software-testing/">[2]</a>(<a rel="nofollow" class="external free" href="https://www.geeksforgeeks.org/unit-testing-software-testing/">https://www.geeksforgeeks.org/unit-testing-software-testing/</a>)</span>
</li>
<li id="cite_note-29"><span class="mw-cite-backlink"><b><a href="#cite_ref-29">^</a></b></span> <span class="reference-text"><cite id="CITEREFBullseye_Testing_Technology2006–2008" class="citation web cs1">Bullseye Testing Technology (2006–2008). <a rel="nofollow" class="external text" href="http://www.bullseye.com/coverage.html">"Intermediate Coverage Goals"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">24 March</span> 2009</span>.</cite></span>
</li>
<li id="cite_note-30"><span class="mw-cite-backlink"><b><a href="#cite_ref-30">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://dlang.org/spec/unittest.html">"Unit Tests - D Programming Language"</a>. <i>D Programming Language</i>. D Language Foundation<span class="reference-accessdate">. Retrieved <span class="nowrap">5 August</span> 2017</span>.</cite></span>
</li>
<li id="cite_note-31"><span class="mw-cite-backlink"><b><a href="#cite_ref-31">^</a></b></span> <span class="reference-text"><cite id="CITEREFSteve_Klabnik_and_Carol_Nichols,_with_contributions_from_the_Rust_Community2015–2023" class="citation web cs1">Steve Klabnik and Carol Nichols, with contributions from the Rust Community (2015–2023). <a rel="nofollow" class="external text" href="https://doc.rust-lang.org/book/ch11-01-writing-tests.html">"How to Write Tests"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">21 August</span> 2023</span>.</cite></span>
</li>
<li id="cite_note-32"><span class="mw-cite-backlink"><b><a href="#cite_ref-32">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://crystal-lang.org/api/0.23.1/Spec.html">"Crystal Spec"</a>. crystal-lang.org<span class="reference-accessdate">. Retrieved <span class="nowrap">18 September</span> 2017</span>.</cite></span>
</li>
<li id="cite_note-33"><span class="mw-cite-backlink"><b><a href="#cite_ref-33">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://golang.org/pkg/testing/">"testing - The Go Programming Language"</a>. golang.org<span class="reference-accessdate">. Retrieved <span class="nowrap">3 December</span> 2013</span>.</cite></span>
</li>
<li id="cite_note-34"><span class="mw-cite-backlink"><b><a href="#cite_ref-34">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://docs.julialang.org/en/v1/stdlib/Test/">"Unit Testing · The Julia Language"</a>. docs.julialang.org<span class="reference-accessdate">. Retrieved <span class="nowrap">15 June</span> 2022</span>.</cite></span>
</li>
<li id="cite_note-35"><span class="mw-cite-backlink"><b><a href="#cite_ref-35">^</a></b></span> <span class="reference-text"><cite id="CITEREFPython_Documentation2016" class="citation web cs1">Python Documentation (2016). <a rel="nofollow" class="external text" href="https://docs.python.org/3/library/unittest.html">"unittest -- Unit testing framework"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">18 April</span> 2016</span>.</cite></span>
</li>
<li id="cite_note-Racket_Unit_Testing-36"><span class="mw-cite-backlink"><b><a href="#cite_ref-Racket_Unit_Testing_36-0">^</a></b></span> <span class="reference-text"><cite id="Racket_Unit_Testing" class="citation web cs1">Welsh, Noel; Culpepper, Ryan. <a rel="nofollow" class="external text" href="http://docs.racket-lang.org/rackunit/index.html">"RackUnit: Unit Testing"</a>. PLT Design Inc<span class="reference-accessdate">. Retrieved <span class="nowrap">26 February</span> 2019</span>.</cite></span>
</li>
<li id="cite_note-Racket_Unit_Testing_Main_dist-37"><span class="mw-cite-backlink"><b><a href="#cite_ref-Racket_Unit_Testing_Main_dist_37-0">^</a></b></span> <span class="reference-text"><cite id="Racket_Unit_Testing_Main_dist" class="citation web cs1">Welsh, Noel; Culpepper, Ryan. <a rel="nofollow" class="external text" href="https://pkgs.racket-lang.org/package/rackunit">"RackUnit Unit Testing package part of Racket main distribution"</a>. PLT Design Inc<span class="reference-accessdate">. Retrieved <span class="nowrap">26 February</span> 2019</span>.</cite></span>
</li>
<li id="cite_note-38"><span class="mw-cite-backlink"><b><a href="#cite_ref-38">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://ruby-doc.org/stdlib-2.0.0/libdoc/minitest/rdoc/MiniTest.html">"Minitest (Ruby 2.0)"</a>. Ruby-Doc.org.</cite></span>
</li>
<li id="cite_note-Clojure_Unit_Testing_Framework-39"><span class="mw-cite-backlink"><b><a href="#cite_ref-Clojure_Unit_Testing_Framework_39-0">^</a></b></span> <span class="reference-text"><cite id="Clojure_Unit_Testing_Framework" class="citation web cs1">Sierra, Stuart. <a rel="nofollow" class="external text" href="https://clojure.github.io/clojure/clojure.test-api.html">"API for clojure.test - Clojure v1.6 (stable)"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">11 February</span> 2015</span>.</cite></span>
</li>
<li id="cite_note-40"><span class="mw-cite-backlink"><b><a href="#cite_ref-40">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://github.com/pester/Pester">"Pester Framework"</a>. <i><a href="GitHub" title="GitHub">GitHub</a></i><span class="reference-accessdate">. Retrieved <span class="nowrap">28 January</span> 2016</span>.</cite></span>
</li>
</ol></div></div>
<div class="mw-heading mw-heading2"><h2 id="Further_reading">Further reading</h2></div>
<ul><li><cite id="CITEREFFeathers2005" class="citation book cs1">Feathers, Michael C. (2005). <i>Working Effectively with Legacy Code</i>. Upper Saddle River, NJ: Prentice Hall Professional Technical Reference. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>978-0131177055</bdi>.</cite></li>
<li><cite id="CITEREFGulatiSharma2017" class="citation book cs1">Gulati, Shekhar; Sharma, Rahul (2017). <i>Java Unit Testing with JUnit 5</i>. <a href="Apress" class="mw-redirect" title="Apress">Apress</a>.</cite></li></ul>
<div class="mw-heading mw-heading2"><h2 id="External_links">External links</h2></div>
<ul><li><a rel="nofollow" class="external text" href="http://c2.com/cgi/wiki?TestDrivenDevelopment">Test Driven Development (Ward Cunningham's Wiki)</a></li></ul>
<div class="navbox-styles"><style data-mw-deduplicate="TemplateStyles:r1236075235">
/* start https://en.wikipedia.org/ */
.mw-parser-output .navbox{box-sizing:border-box;border:1px solid #a2a9b1;width:100%;clear:both;font-size:88%;text-align:center;padding:1px;margin:1em auto 0}.mw-parser-output .navbox .navbox{margin-top:0}.mw-parser-output .navbox+.navbox,.mw-parser-output .navbox+.navbox-styles+.navbox{margin-top:-1px}.mw-parser-output .navbox-inner,.mw-parser-output .navbox-subgroup{width:100%}.mw-parser-output .navbox-group,.mw-parser-output .navbox-title,.mw-parser-output .navbox-abovebelow{padding:0.25em 1em;line-height:1.5em;text-align:center}.mw-parser-output .navbox-group{white-space:nowrap;text-align:right}.mw-parser-output .navbox,.mw-parser-output .navbox-subgroup{background-color:#fdfdfd}.mw-parser-output .navbox-list{line-height:1.5em;border-color:#fdfdfd}.mw-parser-output .navbox-list-with-group{text-align:left;border-left-width:2px;border-left-style:solid}.mw-parser-output tr+tr>.navbox-abovebelow,.mw-parser-output tr+tr>.navbox-group,.mw-parser-output tr+tr>.navbox-image,.mw-parser-output tr+tr>.navbox-list{border-top:2px solid #fdfdfd}.mw-parser-output .navbox-title{background-color:#ccf}.mw-parser-output .navbox-abovebelow,.mw-parser-output .navbox-group,.mw-parser-output .navbox-subgroup .navbox-title{background-color:#ddf}.mw-parser-output .navbox-subgroup .navbox-group,.mw-parser-output .navbox-subgroup .navbox-abovebelow{background-color:#e6e6ff}.mw-parser-output .navbox-even{background-color:#f7f7f7}.mw-parser-output .navbox-odd{background-color:transparent}.mw-parser-output .navbox .hlist td dl,.mw-parser-output .navbox .hlist td ol,.mw-parser-output .navbox .hlist td ul,.mw-parser-output .navbox td.hlist dl,.mw-parser-output .navbox td.hlist ol,.mw-parser-output .navbox td.hlist ul{padding:0.125em 0}.mw-parser-output .navbox .navbar{display:block;font-size:100%}.mw-parser-output .navbox-title .navbar{float:left;text-align:left;margin-right:0.5em}body.skin--responsive .mw-parser-output .navbox-image img{max-width:none!important}@media print{body.ns-0 .mw-parser-output .navbox{display:none!important}}
/* end https://en.wikipedia.org/ */
</style></div><div role="navigation" class="navbox" aria-labelledby="Software_testing107" style="padding:3px"><table class="nowraplinks hlist mw-collapsible autocollapse navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><div id="Software_testing107" style="font-size:114%;margin:0 4em"><a href="Software_testing" title="Software testing">Software testing</a></div></th></tr><tr><th scope="row" class="navbox-group" style="width:1%">Test levels</th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Acceptance_testing" title="Acceptance testing">Acceptance testing</a></li>
<li><a href="System_integration_testing" title="System integration testing">System integration testing</a></li>
<li><a href="System_testing" title="System testing">System testing</a></li>
<li><a href="Integration_testing" title="Integration testing">Integration testing</a></li>
</ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Test types,<br>techniques,<br><a href="Software_testing_tactics" title="Software testing tactics">tactics</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks navbox-subgroup" style="border-spacing:0"><tbody><tr><td colspan="2" class="navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="A/B_testing" title="A/B testing">A/B testing</a></li>
<li><a href="Benchmark_(computing)" title="Benchmark (computing)">Benchmark</a></li>
<li><a href="Compatibility_testing" title="Compatibility testing">Compatibility testing</a></li>
<li><a href="Concolic_testing" title="Concolic testing">Concolic testing</a></li>
<li><a href="Concurrent_testing" title="Concurrent testing">Concurrent testing</a></li>
<li><a href="Conformance_testing" title="Conformance testing">Conformance testing</a></li>
<li><a href="Continuous_testing" title="Continuous testing">Continuous testing</a></li>
<li><a href="Destructive_testing" title="Destructive testing">Destructive testing</a></li>
<li><a href="Development_testing" title="Development testing">Development testing</a></li>
<li><a href="Differential_testing" title="Differential testing">Differential testing</a></li>
<li><a href="Dynamic_program_analysis" title="Dynamic program analysis">Dynamic program analysis</a></li>
<li><a href="Installation_testing" title="Installation testing">Installation testing</a></li>
<li><a href="Negative_testing" title="Negative testing">Negative testing</a></li>
<li><a href="Random_testing" title="Random testing">Random testing</a></li>
<li><a href="Regression_testing" title="Regression testing">Regression testing</a></li>
<li><a href="Security_testing" title="Security testing">Security testing</a></li>
<li><a href="Smoke_testing_(software)" title="Smoke testing (software)">Smoke testing (software)</a></li>
<li><a href="Software_performance_testing" title="Software performance testing">Software performance testing</a></li>
<li><a href="Stress_testing_(software)" title="Stress testing (software)">Stress testing</a></li>
<li><a href="Symbolic_execution" title="Symbolic execution">Symbolic execution</a></li>
<li><a href="Test_automation" title="Test automation">Test automation</a></li>
<li><a href="Usability_testing" title="Usability testing">Usability testing</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">[x]-box<br>style</th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Black-box_testing" title="Black-box testing">Black-box testing</a>
<ul><li><a href="All-pairs_testing" title="All-pairs testing">All-pairs testing</a></li>
<li><a href="Exploratory_testing" title="Exploratory testing">Exploratory testing</a></li>
<li><a href="Fuzz_testing" class="mw-redirect" title="Fuzz testing">Fuzz testing</a></li>
<li><a href="Model-based_testing" title="Model-based testing">Model-based testing</a></li>
<li><a href="Scenario_testing" title="Scenario testing">Scenario testing</a></li></ul></li>
<li><a href="Grey-box_testing" class="mw-redirect" title="Grey-box testing">Grey-box testing</a></li>
<li><a href="White-box_testing" title="White-box testing">White-box testing</a>
<ul><li><a href="API_testing" title="API testing">API testing</a></li>
<li><a href="Mutation_testing" title="Mutation testing">Mutation testing</a></li>
<li><a href="Static_testing" class="mw-redirect" title="Static testing">Static testing</a></li></ul></li></ul>
</div></td></tr></tbody></table><div></div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">See also</th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Graphical_user_interface_testing" title="Graphical user interface testing">Graphical user interface testing</a></li>
<li><a href="Manual_testing" title="Manual testing">Manual testing</a></li>
<li><a href="Orthogonal_array_testing" title="Orthogonal array testing">Orthogonal array testing</a></li>
<li><a href="Pair_testing" title="Pair testing">Pair testing</a></li>
<li><a href="Soak_testing" title="Soak testing">Soak testing</a></li>
<li><a href="Software_reliability_testing" title="Software reliability testing">Software reliability testing</a></li>
<li><a href="Stress_testing" title="Stress testing">Stress testing</a></li>
<li><a href="Web_testing" title="Web testing">Web testing</a></li></ul>
</div></td></tr></tbody></table></div></div><!--htdig_noindex--><div><div class="zim-footer">
This article is issued from <a class="external text" title="Last edited on 2025-07-08" href="https://en.wikipedia.org/wiki/?title=Unit_testing&oldid=1299454853">Wikipedia</a>. The text is available under <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-Share Alike 4.0</a> unless otherwise noted. Additional terms may apply for the media files.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>
</body></html>